package fr.upmc.alasca.centreCalcul.interne.machinePhysique.coeur.ports;

import fr.upmc.alasca.centreCalcul.interne.machinePhysique.coeur.Coeur;
import fr.upmc.alasca.centreCalcul.interne.machinePhysique.coeur.interfaces.CoeurOperateurI;
import fr.upmc.alasca.centreCalcul.objets.EtatCoeur;
import fr.upmc.components.ComponentI;
import fr.upmc.components.ports.AbstractInboundPort;

public class CoeurOperateurInboundPort 
extends		AbstractInboundPort
implements CoeurOperateurI
{
	private static final long serialVersionUID = 1L;




	public CoeurOperateurInboundPort(
			String uri,
			ComponentI owner
			) throws Exception
	{
		super(uri, CoeurOperateurI.class, owner);
	}




	@Override
	public EtatCoeur getEtat() throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.getEtat();
	}


	@Override
	public String getUriApplication() throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.getUriApplication();
	}


	@Override
	public float getFrequence() throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.getFrequence();
	}


	@Override
	public boolean aReservationFrequenceEnCours() throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.aReservationFrequenceEnCours();
	}


	@Override
	public float getFrequenceReservee() throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.getFrequenceReservee();
	}


	@Override
	public void reserverCoeur(String uriApplication) throws Exception {
		final Coeur c = (Coeur) this.owner;
		c.reserverCoeur(uriApplication);
	}


	@Override
	public void dereserverCoeur() throws Exception {
		final Coeur c = (Coeur) this.owner;
		c.dereserverCoeur();
	}


	@Override
	public void allouerCoeur(String uriMachineVirtuelle) throws Exception {
		final Coeur c = (Coeur) this.owner;
		c.allouerCoeur(uriMachineVirtuelle);
	}


	@Override
	public void desallouerCoeur() throws Exception {
		final Coeur c = (Coeur) this.owner;
		c.desallouerCoeur();
	}


	@Override
	public float reserverFrequence(float frequence) throws Exception {
		final Coeur c = (Coeur) this.owner;
		return c.reserverFrequence(frequence);
	}


	@Override
	public void changerFrequence() throws Exception {
		final Coeur c = (Coeur) this.owner;
		c.changerFrequence();
	}
}
